﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Lab_se_4
{
    class show_info
    {
        public show_info(present ListOfSweets, RichTextBox richTextBox1)
        {
            richTextBox1.Clear();
            richTextBox1.AppendText("Конфеты\t\tЦена\tКоличество\tВес\n");


            foreach (var ListOfSweets_item in ListOfSweets.ListOfSweets)
            {
                richTextBox1.AppendText(ListOfSweets_item.name + "\t" + ListOfSweets_item.price + "\t" + ListOfSweets_item.number +"\t\t" + ListOfSweets_item.weight + "\n");
            }

            //Console.WriteLine("______________________________________________________________\n");
            richTextBox1.AppendText("Общая стоимость: " + ListOfSweets.total_price);

        }

    }
}
